|
LM ADD DIRECTIONAL LIGHT
This command adds a light that shines at in only one direction, and has an equal brightness across the entire scene.
LM Add Directional Light DirX#, DirY#, DirZ#, Red#, Green#, Blue#
DirX#
The X component of the light's direction
DirY#
The Y component of the light's direction
DirZ#
The Z component of the light's direction
Red#
The red component of the light's colour, 0.0-1.0
Green#
The green component of the light's colour, 0.0-1.0
Blue#
The blue component of the light's colour, 0.0-1.0
This command does not return a value.
This can be used to represent the sun. The direction is set using the three component parameters DirX, DirY and DirZ, for example 0,-1,0 is a light shining straight down across the entire scene. The direction does not need to be normalised as this is done internally. 0.5,-2,0.5 would represent a light shining down at a slight angle. The light colour is set using the three colour values red, green and blue, and are set as floats between 0.0 for no colour to 1.0 for full colour. This is similar to the DarkBasic RGB() command where 0 is no colour and 255 is full colour. Therefore, in this case 0,0,0 is black, 1,1,1 is white, and 0.2,0,0 is dark red. The colour values can be set above 1.0 to create a light that 'washes out' nearby objects, or below 0.0 to create a shadow light that removes light from areas it affects. The final lightmap colour will be limited to 0.0-1.0
|